<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    function fn() {
      console.log(this);
    }

    let obj1 = {
      name: 'obj1'
    };

    let obj2 = {
      name: 'obj2'
    }

    //
    // fn.call(obj1);
    // bind 只能改变一次函数运行时 this
    let f = fn.bind(obj2).bind(obj1);
    f();

  </script>
</body>

</html>